package com.acme.bankapp.domian.bank;

public class SavingAccount extends AbstractAccount {

    public SavingAccount(double amount) {
        super(amount);
    }

    public void withdraw(final double amount) {

        if (this.balance >= amount) {
           this.setBalance(this.balance - amount);
        } else {
            System.out.print("Not enough money!");
        }

    }

    public double maximumAmountToWithdraw(){
        return super.getBalance();
    }


}
